package com.kuang.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kuang.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper extends BaseMapper<User> {
    //查询所有用户
    List<User> selectAllUser();

    //根据用户名查询密码
    User selectUserByUsername(User user);

    //添加用户
    int addUser(User user);

    //根据id查询用户
    User selectUserById(int id);

    //更新用户
    boolean updateUser(User user);

}
